﻿using System;
using Demo.Data.Model;
using Demo.LinqToSql.Data.Model;

namespace Demo.LinqToSql.Data
{
    public static class EntitiesFactory
    {
        public static ICustomer CreateCustomer(string firstName, string lastName)
        {
            if (firstName == null) throw new ArgumentNullException("firstName");
            if (lastName == null) throw new ArgumentNullException("lastName");

            return new Customer{CustomerId = Guid.NewGuid(), FirstName = firstName, LastName = lastName};
        }

        public static IOrder CreateOrder(Guid customerId)
        {
            return new Order{OrderId = Guid.NewGuid(), CustomerId = customerId};
        }
    }
}
